<#include "../header.ftl">
<link href="${TEMPLATE_PATH}/css/user_base.css" rel="stylesheet" type="text/css" />
<link href="${TEMPLATE_PATH}/css/user.css" rel="stylesheet" type="text/css" />
<link href="${TEMPLATE_PATH}/css/user_reg.css" rel="stylesheet" type="text/css" />

<script>
function showErrors(id,errors){
	for(var name in errors){
		$.fn.tips({type:"error",content:errors[name]});
		var ele=$("input[name='"+name+"']");
		id.validator('showMsg', ele, {
		    type: "error",
		    msg: errors[name]
		});
	}
}
$(function(){
	
	$(".form_pass").validator(
	{
		stopOnError:true,
		theme:'yellow_right_effect',
		ignore:':hidden',
		valid:function(form)
		{
			$.fn.tips({type:'loading',content:'数据提交中'});
			$.ajax(
			{
				url:"/user/withdrawJson.json",
				type:"post",
				data:$(form).serialize(),
				dataType:"json",
				success:function(data){
					var type="warn";
					if(data.result==true)
					{
						type="ok";
					}else
					{
						showErrors($('.form_pass'),data.errors);
					}
					if(data.result==true)
					{
						$.fn.tips({type:type,content:data.msg});
					}
				},
				error:function(XMLHttpRequest, textStatus, errorThrown){
					$.fn.tips({type:"error",content:XMLHttpRequest.responseText});
				}
			});
		}
	});
	
	$("#user_menu_18").addClass("hover");
});
</script>
 <div id="position">您所在的位置：<a href="/">首页</a> > <a href="/user/">会员中心</a></div>
  <div class="w980 mt10 mc">
        <#include "userLeft.ftl">
        <div class="right_big">
            <div class="b">
                <div class="subject">在线提现</div>
                <div class="p35">
                <form class="form_pass" method="post">
                 <ul id="reg">
                    <li><em>可用余额：</em><span>${SESSION_USER.userMoney}</span> 元</li>
                    <li><em>提现金额：</em><input type="text" name="output_money" class="ip" maxlength="10" data-rule="提现金额:required;dot;" /> 元　最低提现金额为<span> 100 </span>元</li>
                    <li><em>报单中心：</em><input type="text" name="input_center_name" id="input_center_name" value="<#if centerUserName??>${centerUserName}</#if>" class="ip" data-rule="报单中心:username;" /> 
                    	</li>
                    <li><em>提现备注：</em><input type="text" name="cashMsg" id="cashMsg" class="ip" /></li>
                    <dd><input type="submit" value="提交" class="bnt_blue" /></dd>
                </ul>
                </form>
                </div>
            </div>
        </div>
</div>
    
<#include "../footer.ftl">